#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2022/2/17 11:34
# @Author  : ldh
#市民头条

from time import sleep
from basic.device.Android import Android


class awz_headlines_page(Android) :
    news_img = "cn.cloudbae.lovewuzhou:id/news_img"
    news = "cn.cloudbae.lovewuzhou:id/tv1"

    @classmethod
    def ifexist(cls) :
        if cls.poco(cls.news_img).exists() :
            return True
        else :
            print("没有市民头条")
            return False

    @classmethod
    def opennews(cls) :
        cls.poco(cls.news).click()
        sleep(3)

    @classmethod
    def check(cls):
        if cls.poco(text="城市消息").exists():
            return True
        else:
            return False
